package com.school_admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author
 * @since 2024-03-18
 */
@TableName("sc_post")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Post implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键帖子id
     */
    @TableId(value = "postId", type = IdType.ASSIGN_ID)
    private String postId;

    /**
     * 帖子标题
     */
    private String title;

    /**
     * 帖子内容
     */
    private String content;

    /**
     * 帖子描述
     */
    private String description;

    /**
     * 分类id
     */
    private Integer categoryId;

    /**
     * 帖子标签
     */
    private String tags;
    /**
     * 帖子封面
     */
    private String img;

    /**
     * 发布用户id
     */
    private String uid;

    /**
     * 阅读量
     */
    private Integer view;

    /**
     * 发布时间
     */
    private String time;

    /**
     * 帖子状态
     */
    private Integer status;

    /**
     * 是否删除
     */
    @TableLogic
    private Integer deleted;
    /**
     * 是否公开
     */
    private int isPublic;
    /**
     * 点赞数
     */
    private Integer like;
    /**
     * 收藏数
     */
    private Integer collection;
}
